package com.hy.usercenter.enums;

/**
 * @Description 队伍状态枚举
 *
 * @Author minsf
 * @Date 2023/2/27
 */
public enum TeamStatusEnum {
    // 公开
    PUBLIC(0, "公开"),
    // 私有
    PRIVATE(1, "私有"),
    // 加密
    SECRET(2, "加密");


    private Integer value;

    private String text;

    TeamStatusEnum(int value, String text) {
        this.value = value;
        this.text = text;
    }

    public static TeamStatusEnum getStatusEnumByValue(int value) {
        TeamStatusEnum[] values = TeamStatusEnum.values();
        for (TeamStatusEnum teamStatusEnum : values) {
            if (teamStatusEnum.getValue() == value) {
                return teamStatusEnum;
            }
        }
        return null;
    }

    public Integer getValue() {
        return value;
    }

    public void setValue(Integer value) {
        this.value = value;
    }

    public String getText() {
        return text;
    }

    public void setText(String text) {
        this.text = text;
    }
}
